home *** CD-ROM | disk | FTP | other *** search
- class Sky extends MovieClip
- {
- var yoff;
- var sky;
- var width;
- var mvo;
- var rad = Stage.width * 5 / 6.283185307179586;
- var doScroll = true;
- function Sky()
- {
- super();
- if(!_root.brdcst)
- {
- _root.brdcst = {};
- AsBroadcaster.initialize(_root.brdcst);
- }
- _root.brdcst.addListener(this);
- this.yoff = this.sky._y;
- this.sky._y = this.yoff;
- this.width = this.sky._width - Vars.swidth;
- this.mvo = (this._height - Stage.height) / 3;
- }
- function scrll(ha, va)
- {
- var _loc2_ = Math.round(this.rad * ha % this.width);
- this._x = !(- (_loc2_ >= 0)) ? _loc2_ : _loc2_ - this.width;
- this.sky._y = this.mvo * (- Math.tan(va)) + this.yoff;
- }
- function setScroll(s)
- {
- if(s != undefined)
- {
- this.doScroll = s;
- }
- else
- {
- this.doScroll = !this.doScroll;
- }
- }
- }
-